
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <title>服务端SDK · MPUSH开发文档</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.0">
        <meta name="author" content="夜色">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-navigator/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="chapter19.html" />
    
    
    <link rel="prev" href="chapter16.md" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="chapter1.html">
            
                <a href="chapter1.html">
            
                    
                    系统架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="chapter2.html">
            
                <a href="chapter2.html">
            
                    
                    服务依赖关系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="chapter3.html">
            
                <a href="chapter3.html">
            
                    
                    协议
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="chapter4.html">
            
                <a href="chapter4.html">
            
                    
                    主要流程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="chapter6.html">
            
                <a href="chapter6.html">
            
                    
                    密钥交换方案
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="chapter7.html">
            
                <a href="chapter7.html">
            
                    
                    握手及快速重连
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="chapter8.html">
            
                <a href="chapter8.html">
            
                    
                    绑定用户及路由发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="chapter9.html">
            
                <a href="chapter9.html">
            
                    
                    解绑用户
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="chapter10.html">
            
                <a href="chapter10.html">
            
                    
                    消息推送
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="chapter11.html">
            
                <a href="chapter11.html">
            
                    
                    Http代理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="chapter12.html">
            
                <a href="chapter12.html">
            
                    
                    服务部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="chapter13.html">
            
                <a href="chapter13.html">
            
                    
                    源码测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="chapter14.html">
            
                <a href="chapter14.html">
            
                    
                    配置详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="chapter17.html">
            
                <a href="chapter17.html">
            
                    
                    Alloc实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="chapter15.html">
            
                <a href="chapter15.html">
            
                    
                    Android SDK
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="chapter15.1.html">
            
                <a href="chapter15.1.html">
            
                    
                    SDK系统架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="chapter15.2.html">
            
                <a href="chapter15.2.html">
            
                    
                    MpushClient架构
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="chapter16.md">
            
                <span>
            
                    
                    IOS SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.12" data-path="chapter18.html">
            
                <a href="chapter18.html">
            
                    
                    服务端SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="chapter19.html">
            
                <a href="chapter19.html">
            
                    
                    HTTP代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="chapter20.html">
            
                <a href="chapter20.html">
            
                    
                    Server源码分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="chapter20.1.html">
            
                <a href="chapter20.1.html">
            
                    
                    模块依赖关系
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >服务端SDK</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x670D;&#x52A1;&#x7AEF;SDK">&#x670D;&#x52A1;&#x7AEF;SDK</h1><h2 id="&#x4F7F;&#x7528;&#x65B9;&#x5F0F;">1. &#x4F7F;&#x7528;&#x65B9;&#x5F0F;</h2><ol><li><p>&#x6DFB;&#x52A0;maven&#x4F9D;&#x8D56;</p><pre><code class="lang-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependency</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>com.github.mpusher<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>mpush-client<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>0.0.2<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependency</span><span class="token punctuation">&gt;</span></span></code></pre>
<p>&#x200B;</p></li>
<li><p>&#x5728;&#x5DE5;&#x7A0B;<code>resources</code>&#x76EE;&#x5F55;&#x589E;&#x52A0;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<code>application.conf</code>&#xFF0C;&#x5E76;&#x914D;&#x7F6E;<code>zookeeper</code></p><pre><code class="lang-java">   mp<span class="token punctuation">.</span>zk<span class="token punctuation">.</span>namespace<span class="token operator">=</span>mpush
   mp<span class="token punctuation">.</span>zk<span class="token punctuation">.</span>server<span class="token operator">-</span>address<span class="token operator">=</span><span class="token string">&quot;127.0.0.1:2181&quot;</span></code></pre>
<p>&#x200B;</p></li>
<li><p>&#x4F7F;&#x7528;<code>com.mpush.api.push.PushSende.java</code>&#x8FDB;&#x884C;&#x63A8;&#x9001;&#xFF0C;&#x4F7F;&#x7528;&#x5176;<code>create</code>&#x65B9;&#x6CD5;&#x521B;&#x5EFA;&#x670D;&#x52A1;&#xFF0C;<code>start</code>&#x65B9;&#x6CD5;&#x542F;&#x52A8;&#x670D;&#x52A1;&#xFF0C;<code>stop</code>&#x65B9;&#x6CD5;&#x505C;&#x6B62;&#x670D;&#x52A1;&#x3002;&#x63A8;&#x9001;&#x63A5;&#x53E3;&#x5B9A;&#x4E49;&#x5982;&#x4E0B;&#xFF1A;</p><pre><code class="lang-java"><span class="token keyword">public</span> <span class="token keyword">interface</span> <span class="token class-name">PushSender</span> <span class="token keyword">extends</span> <span class="token class-name">Service</span> <span class="token punctuation">{</span>
      <span class="token comment" spellcheck="true">//&#x6279;&#x91CF;&#x63A8;&#x9001;&#xFF0C;&#x5EFA;&#x8BAE;&#x5BF9;userIds&#x7684;&#x5927;&#x5C0F;&#x8FDB;&#x884C;&#x9650;&#x5236;</span>
    <span class="token keyword">void</span> <span class="token function">send<span class="token punctuation">(</span></span>String content<span class="token punctuation">,</span> Collection<span class="token operator">&lt;</span>String<span class="token operator">&gt;</span> userIds<span class="token punctuation">,</span> Callback callback<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token comment" spellcheck="true">//&#x5355;&#x7528;&#x6237;&#x63A8;&#x9001;</span>
    FutureTask<span class="token operator">&lt;</span>Boolean<span class="token operator">&gt;</span> <span class="token function">send<span class="token punctuation">(</span></span>String content<span class="token punctuation">,</span> String userId<span class="token punctuation">,</span> Callback callback<span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token keyword">void</span> <span class="token function">send<span class="token punctuation">(</span></span><span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> content<span class="token punctuation">,</span> Collection<span class="token operator">&lt;</span>String<span class="token operator">&gt;</span> userIds<span class="token punctuation">,</span> Callback callback<span class="token punctuation">)</span><span class="token punctuation">;</span>

    FutureTask<span class="token operator">&lt;</span>Boolean<span class="token operator">&gt;</span> <span class="token function">send<span class="token punctuation">(</span></span><span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> content<span class="token punctuation">,</span> String userId<span class="token punctuation">,</span> Callback callback<span class="token punctuation">)</span><span class="token punctuation">;</span>

      <span class="token comment" spellcheck="true">//&#x63A8;&#x9001;&#x56DE;&#x8C03;</span>
    <span class="token keyword">interface</span> <span class="token class-name">Callback</span> <span class="token punctuation">{</span>
        <span class="token keyword">void</span> <span class="token function">onSuccess<span class="token punctuation">(</span></span>String userId<span class="token punctuation">,</span> ClientLocation location<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment" spellcheck="true">//&#x63A8;&#x9001;&#x6210;&#x529F;</span>

        <span class="token keyword">void</span> <span class="token function">onFailure<span class="token punctuation">(</span></span>String userId<span class="token punctuation">,</span> ClientLocation location<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment" spellcheck="true">//&#x63A8;&#x9001;&#x5931;&#x8D25;</span>

        <span class="token keyword">void</span> <span class="token function">onOffline<span class="token punctuation">(</span></span>String userId<span class="token punctuation">,</span> ClientLocation location<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment" spellcheck="true">//&#x7528;&#x6237;&#x4E0D;&#x5728;&#x7EBF;</span>

        <span class="token keyword">void</span> <span class="token function">onTimeout<span class="token punctuation">(</span></span>String userId<span class="token punctuation">,</span> ClientLocation location<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment" spellcheck="true">//&#x63A8;&#x9001;&#x8D85;&#x65F6;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>
<p>&#x200B;</p></li></ol>
<h2 id="&#x63A8;&#x9001;&#x6D41;&#x7A0B;">2. &#x63A8;&#x9001;&#x6D41;&#x7A0B;</h2><h3 id="&#x6D41;&#x7A0B;&#x56FE;">2.1. &#x6D41;&#x7A0B;&#x56FE;</h3><p><img src="MPush&#x63A5;&#x6D88;&#x606F;&#x63A8;&#x9001;.png"></p><h3 id="&#x6D41;&#x7A0B;&#x5206;&#x6790;">2.2. &#x6D41;&#x7A0B;&#x5206;&#x6790;</h3><ol><li><code>PushSender</code>&#x542F;&#x52A8;&#x540E;&#x9996;&#x5148;&#x4ECE;ZK&#x91CC;&#x83B7;&#x53D6;&#x53EF;&#x7528;&#x7684;<code>GatewayServer</code>&#x5217;&#x8868;&#xFF0C;&#x7136;&#x540E;&#x521B;&#x5EFA;&#x76F8;&#x5E94;&#x7684;<code>Client</code>&#x5206;&#x522B;&#x8FDE;&#x63A5;&#x5230;&#x5BF9;&#x5E94;&#x7684;<code>GatewayServer</code>
</li>
<li>&#x5F53;&#x8C03;&#x7528;<code>send</code>&#x65B9;&#x6CD5;&#x53BB;&#x63A8;&#x9001;&#x65F6;&#xFF0C;<code>PushSender</code>&#x9996;&#x5148;&#x4F1A;&#x901A;&#x8FC7;<code>RemoteRouterManager</code>&#x67E5;&#x8BE2;&#x8981;&#x63A8;&#x9001;&#x7684;&#x7528;&#x6237;&#x5F53;&#x524D;&#x6240;&#x767B;&#x5F55;&#x7684;&#x673A;&#x5668;IP&#xFF0C;&#x7136;&#x540E;&#x901A;&#x8FC7;IP&#x9009;&#x62E9;<code>GatewayServer</code>&#x5E76;&#x901A;&#x8FC7;&#x7B2C;1&#x4E2D;&#x5BF9;&#x5E94;&#x7684;<code>Client</code>&#x628A;&#x6D88;&#x606F;&#x53D1;&#x9001;&#x5230;&#x8BE5;&#x673A;&#x5668;&#xFF0C;&#x56E0;&#x4E3A;&#x8BE5;&#x673A;&#x5668;&#x62E5;&#x6709;&#x7528;&#x6237;&#x7684;&#x94FE;&#x63A5;&#x3002;
</li>
<li><code>GatewayServer</code>&#x63A5;&#x6536;&#x5230;<code>Client</code>&#x53D1;&#x9001;&#x8FC7;&#x6765;&#x7684;&#x6D88;&#x606F;&#x540E;&#xFF0C;&#x9996;&#x5148;&#x901A;&#x8FC7;&#x67E5;&#x8BE2;&#x672C;&#x5730;&#x8DEF;&#x7531;<code>LocalRouterManager</code>&#x627E;&#x5230;&#x7528;&#x6237;&#x8FDE;&#x63A5;<code>Connection</code>&#xFF0C;&#x8BE5;&#x94FE;&#x63A5;&#x662F;&#x8FDE;&#x63A5;&#x5230;<code>ConnectionServer</code>&#x7684;&#x3002;
</li>
<li>&#x5982;&#x679C;&#x8FDE;&#x63A5;&#x5B58;&#x5728;&#xFF0C;<code>ConnectionServer</code>&#x4F1A;&#x901A;&#x8FC7;&#x6B64;&#x8FDE;&#x63A5;&#x628A;&#x6D88;&#x606F;&#x4E0B;&#x53D1;&#x5230;&#x5BA2;&#x6237;&#x7AEF;&#x3002;
</li>
<li>&#x5982;&#x679C;&#x63A8;&#x9001;&#x6210;&#x529F;&#xFF0C;<code>GatewayServer</code>&#x4F1A;&#x53D1;&#x9001;&#x6D88;&#x606F;&#x63A8;&#x9001;&#x6210;&#x529F;&#x7684;&#x6D88;&#x606F;&#x7ED9;<code>PushSender</code>&#x6240;&#x6301;&#x6709;&#x7684;<code>Client</code>
</li>
<li><code>PushSender</code>&#x6536;&#x5230;&#x63A8;&#x9001;&#x6210;&#x529F;&#x6D88;&#x606F;&#x540E;&#xFF0C;&#x4F1A;&#x901A;&#x8FC7;<code>Callback#onSuccess</code>&#x56DE;&#x8C03;&#x8C03;&#x7528;&#x65B9;&#xFF0C;&#x6574;&#x4E2A;&#x63A8;&#x9001;&#x6D41;&#x7A0B;&#x7ED3;&#x675F;&#x3002;
</li>
<li>&#x5982;&#x679C;&#x4E2D;&#x95F4;&#x6709;&#x4EFB;&#x4F55;&#x5931;&#x8D25;&#x5219;&#x56DE;&#x8C03;<code>Callback#onFailure</code>&#x3002;
</li>
<li>&#x5982;&#x679C;&#x7528;&#x6237;&#x4E0D;&#x5728;&#x7EBF;&#x5219;&#x56DE;&#x8C03;<code>Callback#onOffline</code>&#x3002;
</li>
<li>&#x5982;&#x679C;&#x5728;&#x4E00;&#x5B9A;&#x65F6;&#x95F4;&#x5185;<code>PushSender</code>&#x6CA1;&#x6709;&#x6536;&#x5230;<code>GatewayServer</code>&#x54CD;&#x5E94;&#x7684;&#x6D88;&#x606F;&#x5219;&#x63A8;&#x9001;&#x8D85;&#x65F6;&#xFF0C;&#x56DE;&#x8C03;<code>Callback#onTimeout</code>&#x901A;&#x77E5;&#x8C03;&#x7528;&#x65B9;&#x3002;
</li></ol>
<h2 id="&#x6E90;&#x7801;&#x89E3;&#x8BFB;">3. &#x6E90;&#x7801;&#x89E3;&#x8BFB;</h2><ol><li><p><code>PushSender</code>&#x7684;&#x5B9E;&#x73B0;&#x7C7B;&#x4E3A;<code>com.mpush.client.push.PushClient.java</code></p></li>
<li><p><code>PushClient</code>&#x4F7F;&#x7528;&#x7684;&#x662F;<code>ConnectionRouterManager</code>&#x8BE5;&#x7C7B;&#x7EE7;&#x627F;&#x81EA;<code>RemoteRouterManager</code>&#x589E;&#x52A0;&#x4E86;&#x672C;&#x5730;&#x7F13;&#x5B58;&#x53EF;&#x5728;&#x6D88;&#x606F;&#x9891;&#x7E41;&#x65F6;&#x51CF;&#x8F7B;<code>Redis</code>&#x538B;&#x529B;&#xFF0C;&#x4F46;&#x4F1A;&#x5B58;&#x5728;&#x4E00;&#x5B9A;&#x60C5;&#x51B5;&#x7684;&#x8BEF;&#x5224;&#x3002;</p></li>
<li><p><code>com.mpush.client.push.PushRequestBus.java</code>&#x7528;&#x4E8E;&#x7EF4;&#x6301;&#x5F02;&#x6B65;&#x63A8;&#x9001;&#x4EFB;&#x52A1;&#xFF0C;&#x7EBF;&#x7A0B;&#x7684;&#x8C03;&#x6574;&#x53EF;&#x901A;&#x8FC7;&#x914D;&#x7F6E;&#x8BBE;&#x7F6E;&#xFF0C;&#x4EFB;&#x52A1;&#x7684;&#x62D2;&#x7EDD;&#x7B56;&#x7565;&#x4E3A;<strong>&#x5728;&#x8C03;&#x7528;&#x7EBF;&#x7A0B;&#x6267;&#x884C;Callback</strong>&#x3002;&#x5177;&#x4F53;&#x89C1;<code>DefaultThreadPoolFactory.java</code>&#x3002;&#x7EBF;&#x7A0B;&#x6C60;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x5982;&#x4E0B;&#xFF1A;</p><pre><code class="lang-java">mp<span class="token punctuation">.</span>thread<span class="token punctuation">.</span>pool<span class="token punctuation">.</span>push<span class="token operator">-</span>callback<span class="token operator">=</span><span class="token punctuation">{</span>
  min<span class="token operator">:</span><span class="token number">2</span><span class="token comment" spellcheck="true">//&#x6838;&#x5FC3;&#x7EBF;&#x7A0B;&#x6570;</span>
  max<span class="token operator">:</span><span class="token number">2</span><span class="token comment" spellcheck="true">//&#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;</span>
  queue<span class="token operator">-</span>size<span class="token operator">:</span><span class="token number">0</span><span class="token comment" spellcheck="true">//&#x961F;&#x5217;&#x5927;&#x5C0F;</span>
<span class="token punctuation">}</span></code></pre>
<p>&#x200B;</p></li>
<li><p><code>GatewayClient</code>&#x4F1A;&#x6839;&#x636E;<code>GatewayServer</code>&#x7684;&#x8FD0;&#x884C;&#x72B6;&#x6001;&#x81EA;&#x884C;&#x8C03;&#x6574;&#xFF0C;&#x5982;&#x679C;&#x6709;<code>GatewayServer</code>&#x5B95;&#x673A;&#x5BF9;&#x5E94;&#x7684;<code>Client</code>&#x4F1A;&#x53CA;&#x65F6;&#x9500;&#x6BC1;&#xFF0C;&#x5982;&#x679C;&#x6709;&#x65B0;&#x7684;&#x673A;&#x5668;&#x8FDB;&#x6765;&#xFF0C;&#x5BF9;&#x5E94;<code>Client</code>&#x4E5F;&#x4F1A;&#x81EA;&#x52A8;&#x521B;&#x5EFA;&#x3002;&#x5177;&#x4F53;&#x53C2;&#x89C1;<code>GatewayClientFactory.java</code>&#x3002;</p><p>&#x200B;</p></li></ol>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; ohun.com 2016 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2016-09-05 18:48:03
</span></footer>

<div id="anchors-navbar"><i class="fa fa-anchor"></i><ul><p><a href="#&#x670D;&#x52A1;&#x7AEF;SDK">&#x670D;&#x52A1;&#x7AEF;SDK</a></p><li><a href="#&#x4F7F;&#x7528;&#x65B9;&#x5F0F;">1. &#x4F7F;&#x7528;&#x65B9;&#x5F0F;</a></li><li><a href="#&#x63A8;&#x9001;&#x6D41;&#x7A0B;">2. &#x63A8;&#x9001;&#x6D41;&#x7A0B;</a></li><ul><li><a href="#&#x6D41;&#x7A0B;&#x56FE;">2.1. &#x6D41;&#x7A0B;&#x56FE;</a></li><li><a href="#&#x6D41;&#x7A0B;&#x5206;&#x6790;">2.2. &#x6D41;&#x7A0B;&#x5206;&#x6790;</a></li></ul><li><a href="#&#x6E90;&#x7801;&#x89E3;&#x8BFB;">3. &#x6E90;&#x7801;&#x89E3;&#x8BFB;</a></li></ul></div><a href="#&#x4F7F;&#x7528;&#x65B9;&#x5F0F;" id="goTop"><i class="fa fa-arrow-up"></i></a>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chapter16.md" class="navigation navigation-prev " aria-label="Previous page: IOS SDK">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="chapter19.html" class="navigation navigation-next " aria-label="Next page: HTTP代理">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"服务端SDK","level":"1.12","depth":1,"next":{"title":"HTTP代理","level":"1.13","depth":1,"path":"chapter19.md","ref":"chapter19.md","articles":[]},"previous":{"title":"IOS SDK","level":"1.11","depth":1,"path":"chapter16.md","ref":"chapter16.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","sharing","search","-highlight","-page-treeview","-anchorjs","baidu","donate","tbfed-pagefooter","navigator","-duoshuo","editlink","splitter"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy ohun.com 2016","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{},"editlink":{"label":"编辑本页","multilingual":false,"base":"https://github.com/mpusher/docs/tree/book"},"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"duoshuo":{"short_name":"ohun","theme":"default"},"donate":{"alipay":"alipay.jpg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"wxpay.png","wechatText":"微信打赏"},"fontsettings":{"theme":"sepia","family":"sans","size":2},"navigator":{},"baidu":{"token":"74e8d02bb383b3d88072165c31989fb2"},"sharing":{"all":["facebook","google","twitter","weibo","instapaper"],"facebook":true,"google":false,"instapaper":false,"twitter":true,"vk":false,"weibo":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchorjs":{"icon":"#","placement":"right","visible":"always","class":"custom-class another-one"}},"theme":"default","author":"夜色","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"MPUSH开发文档","language":"zh-hans","gitbook":"*","description":"mpush开发手册"},"file":{"path":"chapter18.md","mtime":"2016-09-05T10:48:03.000Z","type":"markdown"},"gitbook":{"version":"3.2.0","time":"2016-09-05T10:49:46.256Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-baidu/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-editlink/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

